<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<script type="text/javascript">
window.onload =function level(level) {
	var level = ${sessionScope.mto.memberLevel};
	var span = document.getElementById("memberLevel");
	level = parseInt(level);
	if(level==1){
		span.innerHTML = "일반회원";
	}else{
		span.innerHTML = "운영자";
	}
};
</script>
<script type="text/javascript">

function del() {
	var del = confirm("탈퇴를 하시려는것이 맞습니까?");
	if(del){
		document.memberDelete.submit();
	}else{
		return;
	}
}
</script>
<body>
<h2 align="center">${sessionScope.mto.memberName} 님의 회원정보 입니다.</h2>
<table >
<tr><td>ID : ${sessionScope.mto.memberId}</td></tr>
<tr><td>비밀번호 : ${sessionScope.mto.memberPassword }</td></tr>
<tr><td>이름 : ${sessionScope.mto.memberName }</td></tr>
<tr><td>생년 월일 : ${sessionScope.mto.memberBirthday }</td></tr>
<tr><td>주민등록번호(뒷자리) : ${sessionScope.mto.memberDetail }</td></tr>
<tr><td>회원 분류 : <span id="memberLevel"></span> </td></tr>
<tr><td>우편번호 : ${sessionScope.mto.memberZipcode }</td></tr>
<tr><td>주소 : ${sessionScope.mto.memberAddress1 }</td></tr>
<tr><td>상세 주소 : ${sessionScope.mto.memberAddress2 }</td></tr>
</table>

<form action="/Yogiro/member.do" name="memberDelete">
<a href="member.do?method=login" style="background: #fbd568; border:1px solid #f4ab4c; font-size: 13px; color: #996319;">메인화면</a>
<input type="hidden" name="method" value="deleteMember">
<input type="button" value="회원탈퇴" onclick="del()" style="background: #fbd568; border:1px solid #f4ab4c; font-size: 13px; color: #996319;">
</form>
</body>
</html>